package service.impl;

import bean.Student;
import dao.StudentDao;
import dao.impl.StudentDaoImpl;
import service.StudentService;
import utils.DruidUtils;

import java.util.List;

public class StudentServiceImpl implements  StudentService {
    StudentDao dao = new StudentDaoImpl();
    @Override
    public List<Student> getStudents(String stuname, String stuno, int sex,int pageidex,int pagesize) {
        return dao.getStudents(stuname,stuno,sex,pageidex,pagesize);
    }

    @Override
    public int getTotal(String stuname, String stuno, int sex) {
        return dao.getTotal(stuname,stuno,sex);
    }

    @Override
    public int addstu(Student student) {
        return dao.addstu(student);
    }

    @Override
    public Student findById(int stuid) {
        return dao.findById(stuid);
    }

    @Override
    public int updateStudent(Student student) {
        return dao.updateStudent(student);
    }

    @Override
    public int deleteStudent(int stuid) {
        return dao.deleteStudent(stuid);
    }

    @Override
    public int findByStuno(int stuno) {
        return dao.findByStuno(stuno);
    }


}

